package net.wangds.auth.user.repo.rdbms;

import net.wangds.jpa.repository.RemovableRepo;
import net.wangds.auth.user.entity.GeneralUserResRef;
import net.wangds.auth.user.entity.GeneralUserRoleRef;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserResRefJpaRepo extends RemovableRepo<GeneralUserResRef> {

    List<GeneralUserResRef> findByUserId(String userId);


    Page<GeneralUserResRef> findByUserId(String userId, Pageable page);


    GeneralUserResRef findByUserIdAndResId(String userId, String resId);

    boolean existsByUserIdAndResId(String userId, String resId);

}
